package main

import (
	"fyne.io/fyne/v2"
	"fyne.io/fyne/v2/app"
	"fyne.io/fyne/v2/container"
	"fyne.io/fyne/v2/theme"
	"fyne.io/fyne/v2/widget"
	"github.com/zhaocy/fyne-theme"
)

func main() {
	myApp := app.New()
	myApp.Settings().SetTheme(themex.Themex())
	myWin := myApp.NewWindow("toolbar")

	lb:= widget.NewLabel("")
	tb:=widget.NewToolbar(
		widget.NewToolbarAction(theme.InfoIcon(),func() {
			lb.SetText("info")
		}),
		widget.NewToolbarSpacer(),
		widget.NewToolbarAction(theme.HelpIcon(),func() {
			lb.SetText("help")
		}),
	)

	tb2:= widget.NewToolbar(
		widget.NewToolbarAction(theme.FileIcon(),func() {
			lb.SetText("file")
		}),
		widget.NewToolbarSeparator(),
		widget.NewToolbarAction(theme.UploadIcon(),func() {
			lb.SetText("update")
		}),
	)

	tb2.Append(widget.NewToolbarAction(theme.ErrorIcon(),func() {
		lb.SetText("err")
	}))

	myWin.SetContent(container.NewVBox(
		lb,
		tb,
		tb2,
	))
	myWin.Resize(fyne.NewSize(550, 450))
	myWin.ShowAndRun()
}
